package com.dragon.app.commons.dto;

import java.io.Serializable;
import java.time.LocalDate;

import com.dragon.loan.entity.AcLoanApplyInfo;
import com.dragon.loan.entity.AcUserBank;

public class BankcardSaveDTO implements Serializable{
	private static final long serialVersionUID = 1L;

	private String loanId;// 业务标识ID Stirng Y
	private String bankCardNum;// 银行卡号 string Y
	private String bankCardType;// 银行卡类型 string Y
	private String bankCode;// 银行识别码 string Y
	private String mobileNum;// 手机号码 string Y
	private String bankCardImg;// 银行卡图片 file Y

	private String bankCardImgVerso;// 银行卡反面
	private String validCode; // 手机的验证码判断
	private String type; // 如果是1才往下走 如果不是1就不往下走
	private String cityNo;
	private String subBankCode;
	private String bankName;
	private String cardName;
	private String busType;//区别是还款卡绑卡，还是设置放款卡
	
	private LocalDate validDate;
	/**
	 * 预绑卡请求编号
	 */
	private String requestNo; 
	
	public String getRequestNo() {
		return requestNo;
	}

	public void setRequestNo(String requestNo) {
		this.requestNo = requestNo;
	}

	public static AcUserBank getAcUserBank(BankcardSaveDTO bankcardSaveDTO) {
		AcUserBank acUserBank = new AcUserBank();
		acUserBank.setBankCardNo(bankcardSaveDTO.getBankCardNum());
		acUserBank.setBankCardType(bankcardSaveDTO.getBankCardType());
		acUserBank.setBankCode(bankcardSaveDTO.getBankCode());
		acUserBank.setBankName(bankcardSaveDTO.getBankName());
		acUserBank.setMobileNum(bankcardSaveDTO.getMobileNum());
		acUserBank.setBankCardImage(bankcardSaveDTO.getBankCardImg());
		acUserBank.setBankCardImageVerso(bankcardSaveDTO.getBankCardImgVerso());
		return acUserBank;
	}

	public static AcLoanApplyInfo getAcLoanApplyInfo(BankcardSaveDTO bankcardSaveDTO) {
		AcLoanApplyInfo acLoanApplyInfo = new AcLoanApplyInfo();
		acLoanApplyInfo.setLoanId(bankcardSaveDTO.getLoanId());
		acLoanApplyInfo.setReceiveBankName(bankcardSaveDTO.getBankName());
		acLoanApplyInfo.setReceiveAcct(bankcardSaveDTO.getBankCardNum());
		acLoanApplyInfo.setRepayBankName(bankcardSaveDTO.getBankName());
		acLoanApplyInfo.setRepayAcct(bankcardSaveDTO.getBankCardNum());
		acLoanApplyInfo.setMobileNum(bankcardSaveDTO.getMobileNum());
		return acLoanApplyInfo;
	}

	
	
	public String getSubBankCode() {
		return subBankCode;
	}

	public void setSubBankCode(String subBankCode) {
		this.subBankCode = subBankCode;
	}

	public String getCityNo() {
		return cityNo;
	}

	public void setCityNo(String cityNo) {
		this.cityNo = cityNo;
	}

	public String getBankCardImgVerso() {
		return bankCardImgVerso;
	}

	public void setBankCardImgVerso(String bankCardImgVerso) {
		this.bankCardImgVerso = bankCardImgVerso;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getValidCode() {
		return validCode;
	}

	public void setValidCode(String validCode) {
		this.validCode = validCode;
	}

	public String getBankName() {
		return bankName;
	}

	public void setBankName(String bankName) {
		this.bankName = bankName;
	}

	public String getLoanId() {
		return loanId;
	}

	public void setLoanId(String loanId) {
		this.loanId = loanId;
	}

	public String getBankCardNum() {
		return bankCardNum;
	}

	public void setBankCardNum(String bankCardNum) {
		this.bankCardNum = bankCardNum;
	}

	public String getBankCardType() {
		return bankCardType;
	}

	public void setBankCardType(String bankCardType) {
		this.bankCardType = bankCardType;
	}

	public String getBankCode() {
		return bankCode;
	}

	public void setBankCode(String bankCode) {
		this.bankCode = bankCode;
	}

	public String getMobileNum() {
		return mobileNum;
	}

	public void setMobileNum(String mobileNum) {
		this.mobileNum = mobileNum;
	}

	public String getBankCardImg() {
		return bankCardImg;
	}

	public void setBankCardImg(String bankCardImg) {
		this.bankCardImg = bankCardImg;
	}

	public String getCardName() {
		return cardName;
	}

	public void setCardName(String cardName) {
		this.cardName = cardName;
	}
	
	public String getBusType() {
		return busType;
	}

	public void setBusType(String busType) {
		this.busType = busType;
	}

	
	public LocalDate getValidDate() {
		return validDate;
	}

	public void setValidDate(LocalDate validDate) {
		this.validDate = validDate;
	}

	@Override
	public String toString() {
		return "BankcardSaveDTO [loanId=" + loanId + ", bankCardNum=" + bankCardNum + ", bankCardType=" + bankCardType
				+ ", bankCode=" + bankCode + ", mobileNum=" + mobileNum + ", bankCardImg=" + bankCardImg
				+ ", bankCardImgVerso=" + bankCardImgVerso + ", validCode=" + validCode + ", type=" + type + ", cityNo="
				+ cityNo + ", subBankCode=" + subBankCode + ", bankName=" + bankName + ", cardName=" + cardName + "]";
	}




}
